1. Field of the Invention
The present invention relates to the field of computer graphics, including graphical user interfaces. More specifically, the present invention relates to a method and apparatus for rendering objects in a computer display with added realism.
2. Background
In a 3-D graphics computer system having a 2-D raster display, realistic 3-D effects are typically achieved by rendering objects on the 2-D raster display using perspective algorithms. A perspective algorithm well known in the art is the "z-divide" algorithm. Under this approach, every point of every object to be rendered has a triplet of coordinates (x, y, z) associated with it. Before the objects are rendered, the x and y coordinates of all points of all objects, are divided by their corresponding z values. The objects are then rendered by rendering all points in accordance with the computed x/z and y/z values. An example of such 3-D graphics computer systems is the Sparcstation.RTM., manufactured by Sun Microsystems Inc., of Mountain View, Calif., embodied with the Programmer's Hierarchical Interactive Graphics System (PHIGS) (Sparcstation is a registered trademark of Sun Microsystems). The 3-D effects are realistically achieved, because the z-divides are performed for all points of all objects to be rendered, and the amount of computations, and therefore the resources in terms of CPU time and storage required, are substantial. As a result, 3-D graphics computer systems tend to be more costly than other non-three dimensional display systems.
In 2-D graphics computer systems, objects are rendered on the 2-D raster display through parallel projections. The user's eye is set at infinity. Using this approach, every object to be rendered has a pair of coordinates (x, y) associated with it. Beyond the x and y coordinates, only a "depth" order is provided for determining which object gets displayed when two objects overlap. Particular examples of such 2-D graphics computer systems include the Macintosh.RTM. computer systems, manufactured by Apple Computer, Inc. of Cupertino, Calif., and various personal computers based on the X'86 microprocessor of Intel, Inc., of Santa Clara, Calif., manufactured by IBM of Armonk, N.Y., and other vendors, embodied with the Window.TM. system of Microsoft, Inc. of Redmond, Wash. (Macintosh is a registered trademark of Apple Computer and Window is a trademark of Microsoft). Since there are no z-divides to be performed for every point of every object to be rendered, the amount of computations, and therefore the resources required, are substantially less. As a result, 2-D graphics computer systems tend to be relatively less expensive than their three dimensional counterparts.
However, the 3-D effects are not realistically achieved on these 2-D graphics computer systems. For example, as the user's viewpoint (location) changes, objects at different depths will move the same distance. This is not what happens in the real world, where the user will see the effect of parallax. That is, objects closer to the user will appear to move more in distance, while objects further away from the user will appear to move a little bit, if at all.
Thus, it is desirable to be able to render objects on a 2-D raster display of a 2-D graphics computer system with added realism, without requiring the amount of computations and the resources of a 3-D graphics computer system. More specifically, it is desirable to be able to introduce the parallax effect to objects rendered in a less costly manner. As will be disclosed, the present invention provides for such a method and apparatus which advantageously achieves the desired results.